<%
# Copyright (C) 2013 - present Instructure, Inc.
#
# This file is part of Canvas.
#
# Canvas is free software: you can redistribute it and/or modify it under
# the terms of the GNU Affero General Public License as published by the Free
# Software Foundation, version 3 of the License.
#
# Canvas is distributed in the hope that it will be useful, but WITHOUT ANY
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
# A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
# details.
#
# You should have received a copy of the GNU Affero General Public License along
# with this program. If not, see <http://www.gnu.org/licenses/>.
%>

<% css_bundle :all_courses %>
<% js_bundle  :all_courses %>
<% content_for :page_title, t('titles.all_courses', "All Courses") %>

<h1>All Courses</h1>
<form id="course_filter" action="/search/all_courses" method="get" class="form-inline">
  <input type="search" placeholder="{{#t}}Name') %>" aria-label="<%= t(:search, 'Search{{/t}}" name="search" value="<%= @search %>" />
  <input type="checkbox" id="public_only" name="public_only"<%= ' checked' if @public_only %> />
  <label for="public_only">
    {{#t}}Public courses only{{/t}}
  </label>
  <input type="checkbox" id="open_enrollment_only" name="open_enrollment_only"<%= ' checked' if @open_enrollment_only %> />
  <label for="open_enrollment_only">
    {{#t}}Open enrollment courses only{{/t}}
  </label>
  <button type="submit">{{#t}}Search{{/t}}</button>
</form>
<div id="catalog_content">
  <%=raw @contentHTML %>
</div>
